package com.jzhao.jpre.model;

import org.springframework.dao.DataAccessException;

import com.jzhao.jpre.base.Assembler;
import com.jzhao.jpre.model.dao.DeviceDao;


public class TestDevice {
	public static void main(String[] args){
	DeviceDao deviceDao=(DeviceDao)Assembler.getInstance("deviceDao");
	Device device=null;
	
	try{
		device=deviceDao.selectByDevNo("009001");
		System.out.println("DevNo = " + device.getDevNo());
		System.out.println("DistrictNo = " + device.getDistrictNo());
		System.out.println("DevStat = " + device.getDevStat());
		System.out.println("LogLvl = " + device.getLogLvl());
		System.out.println("DevIp = " + device.getDevIp());
		System.out.println("ChkFlag = " + device.getChkFlag());
		
	}catch(DataAccessException dae){
		System.out.println("The record doesn't exist!");
		}
	}
}


